package com.hello.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 报生成记录对象 report_generation_log
 * 
 * @author hello
 * @date 2025-09-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ReportGenerationLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 生成ID */
    private Long generationId;

    /** 模板ID */
    @Excel(name = "模板ID")
    private Long templateId;

    /** 报表标题 */
    @Excel(name = "报表标题")
    private String reportTitle;

    /** 统计周期 */
    @Excel(name = "统计周期")
    private String reportPeriod;

    /** 报表开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报表开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reportStartDate;

    /** 报表结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报表结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reportEndDate;

    /** 报表文件路径 */
    @Excel(name = "报表文件路径")
    private String reportFilePath;

    /** 报表文件大小(字节) */
    @Excel(name = "报表文件大小(字节)")
    private Long reportFileSize;

    /** 报表格式(pdf/excel/html) */
    @Excel(name = "报表格式(pdf/excel/html)")
    private String reportFormat;

    /** 生成状态(generating=生成中/success=成功/failed=失败) */
    @Excel(name = "生成状态(generating=生成中/success=成功/failed=失败)")
    private String generationStatus;

    /** 生成开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生成开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date generationStartTime;

    /** 生成结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生成结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date generationEndTime;

    /** 生成耗时(秒) */
    @Excel(name = "生成耗时(秒)")
    private Long generationDuration;

    /** 错误信息 */
    @Excel(name = "错误信息")
    private String errorMessage;

    /** 下载次数 */
    @Excel(name = "下载次数")
    private Long downloadCount;

    /** 最后下载时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后下载时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastDownloadTime;

    /** 是否自动生成(0=否,1=是) */
    @Excel(name = "是否自动生成(0=否,1=是)")
    private String autoGenerated;

    /** 生成者 */
    @Excel(name = "生成者")
    private String generatedBy;

    public void setGenerationId(Long generationId) 
    {
        this.generationId = generationId;
    }

    public Long getGenerationId() 
    {
        return generationId;
    }
    public void setTemplateId(Long templateId) 
    {
        this.templateId = templateId;
    }

    public Long getTemplateId() 
    {
        return templateId;
    }
    public void setReportTitle(String reportTitle) 
    {
        this.reportTitle = reportTitle;
    }

    public String getReportTitle() 
    {
        return reportTitle;
    }
    public void setReportPeriod(String reportPeriod) 
    {
        this.reportPeriod = reportPeriod;
    }

    public String getReportPeriod() 
    {
        return reportPeriod;
    }
    public void setReportStartDate(Date reportStartDate) 
    {
        this.reportStartDate = reportStartDate;
    }

    public Date getReportStartDate() 
    {
        return reportStartDate;
    }
    public void setReportEndDate(Date reportEndDate) 
    {
        this.reportEndDate = reportEndDate;
    }

    public Date getReportEndDate() 
    {
        return reportEndDate;
    }
    public void setReportFilePath(String reportFilePath) 
    {
        this.reportFilePath = reportFilePath;
    }

    public String getReportFilePath() 
    {
        return reportFilePath;
    }
    public void setReportFileSize(Long reportFileSize) 
    {
        this.reportFileSize = reportFileSize;
    }

    public Long getReportFileSize() 
    {
        return reportFileSize;
    }
    public void setReportFormat(String reportFormat) 
    {
        this.reportFormat = reportFormat;
    }

    public String getReportFormat() 
    {
        return reportFormat;
    }
    public void setGenerationStatus(String generationStatus) 
    {
        this.generationStatus = generationStatus;
    }

    public String getGenerationStatus() 
    {
        return generationStatus;
    }
    public void setGenerationStartTime(Date generationStartTime) 
    {
        this.generationStartTime = generationStartTime;
    }

    public Date getGenerationStartTime() 
    {
        return generationStartTime;
    }
    public void setGenerationEndTime(Date generationEndTime) 
    {
        this.generationEndTime = generationEndTime;
    }

    public Date getGenerationEndTime() 
    {
        return generationEndTime;
    }
    public void setGenerationDuration(Long generationDuration) 
    {
        this.generationDuration = generationDuration;
    }

    public Long getGenerationDuration() 
    {
        return generationDuration;
    }
    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }
    public void setDownloadCount(Long downloadCount) 
    {
        this.downloadCount = downloadCount;
    }

    public Long getDownloadCount() 
    {
        return downloadCount;
    }
    public void setLastDownloadTime(Date lastDownloadTime) 
    {
        this.lastDownloadTime = lastDownloadTime;
    }

    public Date getLastDownloadTime() 
    {
        return lastDownloadTime;
    }
    public void setAutoGenerated(String autoGenerated) 
    {
        this.autoGenerated = autoGenerated;
    }

    public String getAutoGenerated() 
    {
        return autoGenerated;
    }
    public void setGeneratedBy(String generatedBy) 
    {
        this.generatedBy = generatedBy;
    }

    public String getGeneratedBy() 
    {
        return generatedBy;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("generationId", getGenerationId())
            .append("templateId", getTemplateId())
            .append("reportTitle", getReportTitle())
            .append("reportPeriod", getReportPeriod())
            .append("reportStartDate", getReportStartDate())
            .append("reportEndDate", getReportEndDate())
            .append("reportFilePath", getReportFilePath())
            .append("reportFileSize", getReportFileSize())
            .append("reportFormat", getReportFormat())
            .append("generationStatus", getGenerationStatus())
            .append("generationStartTime", getGenerationStartTime())
            .append("generationEndTime", getGenerationEndTime())
            .append("generationDuration", getGenerationDuration())
            .append("errorMessage", getErrorMessage())
            .append("downloadCount", getDownloadCount())
            .append("lastDownloadTime", getLastDownloadTime())
            .append("autoGenerated", getAutoGenerated())
            .append("generatedBy", getGeneratedBy())
            .toString();
    }
}
